COMBOOT

Section: File Formats (5)
Updated: Boot Sector for booting x86 .COM files
Index Return to Main Contents

 

 

NAME

comboot - floppy boot sector for loading a .COM file

 

SYNOPSIS

cat /usr/lib/bootsectors/comboot your_com_file > /dev/fd0

 

DESCRIPTION

comboot is a boot sector that can be used to load and run a DOS-style .COM file. At the time of the writing of this manual page, the principal use of comboot was to make freely redistributable network boot floppies for Linux from the etherboot software package. etherboot can produce .COM files for booting Linux from a number of ethernet cards, but you needed to have a copy of DOS on the diskette to run the .COM file, so the diskette images were not freely redistributable. comboot solves this problem.

You use comboot by concatenating it with the .COM file that you want to boot and then writing the two files together to a raw floppy disk. The floppy is now a bootable diskette which boot the .COM file. You should be able to write the same image to any kind of floppy diskette because the boot sector will find out what kind of diskette it has been written to and will arrange its reads accordingly.

 

THEORY OF OPERATION

at 0x100 (256 decimal) bytes after the start of the code segment (the address pointed to by the i386 CS register). comboot currently loads its target file at 0x10000 (64 kilobytes), although this can be changed by editting in SYSSEG parameter of comboot.S in the source tree.

Since .COM files are limited to 64 kilobytes by DOS and all floppy disks are larger than 64 kilobytes and the contents of memory at boot time is undefined anyway, comboot just loads 64 kilobytes and jumps to it regardless of the actual size of the .COM file. If you want to make a boot sector that will run slightly faster by only loading the actual number of sectors you need, you can edit the source code (comboot.S) and change the parameter SYSSIZE to the size of your file in 16 byte blocks (i.e., (file_size+15)/16). In general, the loading with the generic comboot boot sector goes by quickly enough that it is probably not worth the bother making a special boot sector to boot a smaller .COM file slightly more quickly.

Of course, DOS is not loaded when you use comboot, so these .COM files cannot make any calls to DOS, although they can call the BIOS.

 

EXAMPLES

To make a bootable floppy from the NE-2000 ethernet boot file (ne.o) produced by the etherboot software package, you would type the following:

        cat /usr/lib/bootsectors/comboot ne.o > /dev/fd0

To make a bootable floppy from the 3c509 ethernet boot file (3c509.o) produced by the etherboot software package, you would type the following:

        cat /usr/lib/bootsectors/comboot 3c509.o > /dev/fd0

 

AUTHORS

comboot is derived from the boot sector in the 1.3.95 Linux kernel in arch/i386/boot/bootsect.S, which was written by Linus Torvalds, Drew Eckhardt, and Bruce Evans. comboot is a essentially stripped down and slightly modified version the Linux floppy boot sector. This adaptation was done by Adam Richter, who also wrote this manual page.

The source tree for comboot also uses the as86 and ld86 utilities for compiling and linking real mode assembler files as Minix executables under Linux, which were written by Doug Evans.

The makebootsect program used in the source tree to extract a 512 byte boot sector from a Minix executable is a stripped down version of arch/i386/boot/tools/build.c from the linux 1.3.95 kernel source tree.

 

BUGS

It is debatable what the comboot source tree should do on a non-intel platform. Currently, comboot will build the same intel binary image that it would on an intel platform. Since .COM files are an intel-ism, this is probably the correct thing to do. Are there .COM file under Windows NT for Digital Alpha?

 

MAINTAINER

Please send bug reports to comboot-bugs@yggdrasil.com.


 

Index

NAME
SYNOPSIS
DESCRIPTION
THEORY OF OPERATION
EXAMPLES
AUTHORS
BUGS
MAINTAINER

This document was created by man2html, using the manual pages.
Time: 14:02:15 GMT, November 05, 2024